core: Make ostree_write_variant_with_size() private
authorColin Walters <walters@verbum.org>
Wed, 4 Sep 2013 11:49:41 +0000 (07:49 -0400)
committerColin Walters <walters@verbum.org>
Wed, 4 Sep 2013 11:49:41 +0000 (07:49 -0400)
More work making the file formats and utilities private.

doc/ostree-sections.txt
src/libostree/ostree-core-private.h
src/libostree/ostree-core.c
src/libostree/ostree-core.h
src/libostree/ostree-repo.c

index 1ecb1381ad5f4fd0eec28b75138a6bd4ac13dab6..28ae59fe8b219731bbe01f5031844f9ab382f40e 100644 (file)
@@ -32,7 +32,6 @@ ostree_get_relative_object_path
 ostree_get_xattrs_for_file
 ostree_set_xattrs
 ostree_map_metadata_file
-ostree_write_variant_with_size
 ostree_content_stream_parse
 ostree_content_file_parse
 ostree_write_file_header_update_checksum
index 47d96f6c123e0b5f4971873be8020cf37bf70fb5..adb98afb5c3d584b8e949f2447db6b82d86619af 100644 (file)
@@ -66,5 +66,14 @@ G_BEGIN_DECLS
 GVariant *_ostree_zlib_file_header_new (GFileInfo         *file_info,
                                         GVariant          *xattrs);
 
+gboolean _ostree_write_variant_with_size (GOutputStream      *output,
+                                          GVariant           *variant,
+                                          guint64             alignment_offset,
+                                          gsize              *out_bytes_written,
+                                          GChecksum          *checksum,
+                                          GCancellable       *cancellable,
+                                          GError            **error);
+
+
 G_END_DECLS
 
index 0248a718ffdbc3896ef4e9cc3bf42e7c9ac02a35..e6559dcb012f7ef20f9729e91fee46bc0617e0dd 100644 (file)
@@ -453,8 +453,8 @@ write_padding (GOutputStream    *output,
   return ret;
 }
 
-/**
- * ostree_write_variant_with_size:
+/*
+ * _ostree_write_variant_with_size:
  * @output: Stream
  * @variant: A variant
  * @alignment_offset: Used to determine whether or not we should write padding bytes
@@ -469,13 +469,13 @@ write_padding (GOutputStream    *output,
  * accessed.
  */
 gboolean
-ostree_write_variant_with_size (GOutputStream      *output,
-                                GVariant           *variant,
-                                guint64             alignment_offset,
-                                gsize              *out_bytes_written,
-                                GChecksum          *checksum,
-                                GCancellable       *cancellable,
-                                GError            **error)
+_ostree_write_variant_with_size (GOutputStream      *output,
+                                 GVariant           *variant,
+                                 guint64             alignment_offset,
+                                 gsize              *out_bytes_written,
+                                 GChecksum          *checksum,
+                                 GCancellable       *cancellable,
+                                 GError            **error)
 {
   gboolean ret = FALSE;
   guint64 variant_size;
@@ -538,8 +538,8 @@ ostree_write_file_header_update_checksum (GOutputStream         *out,
   gboolean ret = FALSE;
   gsize bytes_written;
 
-  if (!ostree_write_variant_with_size (out, header, 0, &bytes_written, checksum,
-                                       cancellable, error))
+  if (!_ostree_write_variant_with_size (out, header, 0, &bytes_written, checksum,
+                                        cancellable, error))
     goto out;
 
   ret = TRUE;
@@ -583,8 +583,8 @@ ostree_raw_file_to_content_stream (GInputStream       *input,
 
   header_out_stream = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
 
-  if (!ostree_write_variant_with_size (header_out_stream, file_header, 0, NULL, NULL,
-                                       cancellable, error))
+  if (!_ostree_write_variant_with_size (header_out_stream, file_header, 0, NULL, NULL,
+                                        cancellable, error))
     goto out;
 
   if (!g_output_stream_close (header_out_stream, cancellable, error))
index bace0b25ac8f19125f4b18782cedf38821f88b6d..25ba3f643410dde56469c041b31f15a633188e33 100644 (file)
@@ -171,14 +171,6 @@ gboolean ostree_map_metadata_file (GFile                       *file,
                                    GVariant                   **out_variant,
                                    GError                     **error);
 
-gboolean ostree_write_variant_with_size (GOutputStream      *output,
-                                         GVariant           *variant,
-                                         guint64             alignment_offset,
-                                         gsize              *out_bytes_written,
-                                         GChecksum          *checksum,
-                                         GCancellable       *cancellable,
-                                         GError            **error);
-
 GVariant *ostree_file_header_new (GFileInfo         *file_info,
                                   GVariant          *xattrs);
 
index 1a5b0de27f75d224fe1aad18ed37305cc3a6e310..48f707c074f3821ccff2a9b05e1fb87dea5deb80 100644 (file)
@@ -710,8 +710,8 @@ stage_object (OstreeRepo         *self,
 
           file_meta = _ostree_zlib_file_header_new (file_info, xattrs);
 
-          if (!ostree_write_variant_with_size (temp_out, file_meta, 0, NULL, NULL,
-                                               cancellable, error))
+          if (!_ostree_write_variant_with_size (temp_out, file_meta, 0, NULL, NULL,
+                                                cancellable, error))
             goto out;
 
           if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_REGULAR)